<template>
  <div class="hotsinger">
    <div class="singer" v-for="item in hotsingerlist" :key="item.id">
      <router-link
        :to="{
          name: 'SingerDes',
          params: { hotid: item.id, url: item.picUrl },
        }"
      >
        <img :src="item.picUrl" alt="" />
        <p>{{ item.name }}</p>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: "HotSinger",
  data() {
    return {
      hotsingerlist: null,
    };
  },
  props: {},
  created() {
    this.$http
      .get("/top/artists", {
        params: {
          limit: 15,
        },
      })
      .then((d) => {
        this.hotsingerlist = d.data.artists;
        // console.log(this.hotsingerlist);
      });
  },
};
</script>

<style lang="less" scoped>
.hotsinger {
  display: flex;
  width: 100vw;
  flex-wrap: wrap;
  justify-content: space-around;
  padding-bottom: 35px;
  margin-bottom: 35px;
  border-bottom: 2px solid #f4d160;
  position: relative;
  a {
    color: black;
  }
  .singer {
    width: 33%;
    text-align: center;
    margin-top: 15px;
    img {
      height: 90px;
      width: 90px;
      border-radius: 25px 10px 25px 10px;
    }
    p {
      margin-top: 2px;
    }
  }
}
.hotsinger::after {
  content: "END";
  position: absolute;
  background-color: white;
  letter-spacing: 5px;
  font-size: 12px;
  text-align: center;
  padding-left: 5px;
  border-left: 2px solid #f4d160;
  border-right: 2px solid #f4d160;
  left: 50%;
  margin-left: -50px;
  bottom: -9px;
  width: 100px;
}
</style>